gtkwindow: Use pointer-oriented function to deal with crossing events
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 9 Aug 2022 16:49:35 +0000 (18:49 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 9 Aug 2022 17:48:15 +0000 (19:48 +0200)
commit54465adff23c5155ed52580beabf50b2a03dff22
tree691bd970a7606dd34dce1b93e331a20cefd1308a
parent25c3616a79179470fe9deeeb182d120fa2f97322
gtkwindow: Use pointer-oriented function to deal with crossing events

Commit adba0b97 fixed missed pointer crossings by using a helper function that
was already present and looked like did everything that was needed. However
this function was oriented to keyboard focus and it also did update the related
widget state. Doing these changes on pointer-based crossing was misuse, and
could cause weird interactions with keyboard focus management.

Fix this by using gtkmain.c gtk_synthesize_crossing_event() that is in fact
oriented to pointers.

Fixes: adba0b97 (gtkwindow: Synthesize pointer crossing events on state changes)
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5094
gtk/gtkmain.c
gtk/gtkprivate.h
gtk/gtkwindow.c